package com.blog.frontend.pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.link.Link;

import com.blog.frontend.pages.parts.ArticleListViewer;

public abstract class AbstractPage extends WebPage {
	
	public AbstractPage() {
		add(new Link("listArticlesLink") {
			private static final long serialVersionUID = -2699415855203102454L;
			
			@Override
			public void onClick() {
				setResponsePage(ListArticlesPage.class);
			}
			
		});
		add(new Link("addArticleLink") {
			private static final long serialVersionUID = 776185892037454146L;
			
			@Override
			public void onClick() {
				setResponsePage(new EditArticlePage(null));
			}
			
		});
		// add(new Label("header", "This is in the header"));
		// add(new Label("footer", "This is in the footer"));
		
		add(new ArticleListViewer("sidebar"));
	}
	
}
